local sk__huxiao = fk.CreateSkill {

  name = "sk__huxiao",

  tags = {  },

}



sk__huxiao:addEffect(fk.DamageCaused, {
  name = "sk__huxiao",
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(sk__huxiao.name) and data.card and data.card.trueName == "slash" and
      player.phase == Player.Play
  end,
  on_cost = function(self, event, target, player, data)
    return player.room:askForSkillInvoke(player, sk__huxiao.name, nil, "#sk__huxiao-invoke::"..data.to.id)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    player:turnOver()
    if not player.dead then
      player:drawCards(1, sk__huxiao.name)
    end
    data.damage = data.damage + 1
    local current = room.logic:getCurrentEvent()
    local use_event = current:findParent(GameEvent.UseCard)
    if not use_event then return end
    local turn_event = use_event:findParent(GameEvent.Turn)
    if not turn_event then return end
    use_event:addExitFunc(function()
      turn_event:shutdown()
    end)
  end,
})

return sk__huxiao